<template>
	<view class="padb30">
		<cu-custom bgColor="bg-gradual-blue" isBack="">
			<block slot="content">产能</block>
		</cu-custom>
		<scroll-view scroll-x class="bg-white nav pos-f">
			<view class="cu-item ripple" :class="TabCur==-1?'text-orange cur':''" @tap="tab(-1)">
					全部
			</view>
			<view class="cu-item ripple" :class="TabCur==index?'text-orange cur':''" @tap="tab(index)" v-for="item,index in label">
				{{item}}
			</view>
		</scroll-view>
		<view class="padt15 bcf">
			<view class="pad2 flex-r flex-fill bc13" v-for="row,index in data">
				<view class="list-style-1 flcc bcf padr3">{{row.name}}</view>
				<view class="flex1">
					<view class="pad2 bdbda flrc" v-for='num,i in row.data' v-show="TabCur==-1 || TabCur==i">
						<view>{{label[i]}}</view>
						<view class="flex1 tar fs14 fwb">{{num}}</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import api from '../../../static/js/api.js'
	import com from '../../../static/js/com.js'
	import win from '../../../static/js/win.js'
	import list from '../../../static/js/list.js'
	export default {

		data() {
			return {
				list: [],
				data:[],
				label:[],
				TabCur:0
			}
		},
		methods: {
			tab(index) {
				this.TabCur = index
			}
		},
		created() {

			let _this = this

			this.$api.get('/admin/Stream/welcome',{},(res)=>{
				console.log(res)
				this.day = res.d.order.day
				this.week = res.d.order.week
				this.month = res.d.order.month
				this.data = res.d.point.data
				this.label = res.d.point.label
			})
			
		},
		onShow() {

		},
		onReachBottom() {
			// list.getList()
		},
		onPullDownRefresh() {
			list.reload()
		}
	}
</script>

<style>

</style>
<!-- <view class="mart5">
			<view class="list-style-1">查看产能</view>
		</view>
		<view>
			<view class="bcf round5  marlr3 pad2 mart5" v-for="(item,index) in list" :key="index">
				<view class="flrc padtb2 bdbso">
					<view class="flex1 fs16 fwb">{{item.day}}</view>
					<view class=" tar padlr3 padtb1 round1" >
						<text class="bg-black padlr3 padtb1 round1">{{item.point.name}}</text>
					</view>
				</view>
				<view class="flex-r flex-start c11 padtb3">
					<view class="wh20-20 mart3 marr2">
						<image :src="$api.getAssetBaseUrl() + item.streamOrder.cover" class="wh20-20" mode="aspectFill"></image>
					</view>
					<view class="flex1 lh15 fs16 tar">
						<view class="flex1 c11 lh2 fs10">{{item.streamOrder.info}}</view>
						<view class="flex-r flex-end"><text class="fs10 flex2 tar">工作量：</text><text class="tar flex1">{{item.num}}</text></view>
						<view class="flex-r flex-end"><text class="fs10 flex2 tar">最大产能：</text><text class="tar flex1">{{item.point.capacity}}</text></view>
					</view>
				</view>
				<view class="bdtso pad3">
					{{item.streamOrder.tips}}
				</view>
			</view>
		</view> -->